diff --git a/swh/web/browse/snapshot_context.py b/swh/web/browse/snapshot_context.py --- a/swh/web/browse/snapshot_context.py +++ b/swh/web/browse/snapshot_context.py @@ -302,7 +302,7 @@ branches[branch_alias]["name"] = branch_alias ret_branches = list(sorted(branches.values(), key=lambda b: b["name"])) - ret_releases = list(sorted(releases.values(), key=lambda b: b["name"])) + ret_releases = list(sorted(releases.values(), key=lambda b: b["branch_name"])) return ret_branches, ret_releases, resolved_aliases diff --git a/swh/web/browse/templates/browse-releases.html b/swh/web/browse/templates/browse-releases.html --- a/swh/web/browse/templates/browse-releases.html +++ b/swh/web/browse/templates/browse-releases.html @@ -17,7 +17,8 @@
Name | +Branch name | +Release name | Target | Message | Date | @@ -27,13 +28,19 @@ {% if displayed_releases|length > 0 %} {% for release in displayed_releases %}
---|---|---|---|---|---|
+ | {% if release.alias %} {% else %} - + {% endif %} + {{ release.branch_name }} + + | ++ + {{ release.name }} | diff --git a/swh/web/browse/tests/views/test_snapshot.py b/swh/web/browse/tests/views/test_snapshot.py --- a/swh/web/browse/tests/views/test_snapshot.py +++ b/swh/web/browse/tests/views/test_snapshot.py @@ -390,8 +390,10 @@ query_params=query_params, ) - assert_contains(resp, '' % escape(browse_release_url)) - assert_contains(resp, '' % escape(browse_revision_url)) + assert_contains(resp, release["branch_name"]) + assert_contains(resp, release["name"]) + assert_contains(resp, f'') + assert_contains(resp, f'') _check_origin_link(resp, origin_info["url"])